import type { User } from './types/user'
import { http } from '@/http/http'
// 获取用户信息
export function getUser() {
  // 从本地存储中获取token
  const token = uni.getStorageSync('token')
  // 添加token到请求头
  const header = token ? { 'Authorization': `Bearer ${token}` } : {}
  return http.get<User>('/patient/myUser', {}, header)
}
